#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QLabel>
#include <QImage>
#include "uart.h"
#include "libv4l2.h"

namespace Ui {
class monitorForm;
}

class monitorForm : public QWidget
{
    Q_OBJECT

public:
    explicit monitorForm(QWidget *parent = 0);
    ~monitorForm();
    void keyPressEvent(QKeyEvent *event);

    int cameraInit();
    int cameraEXit();
    void showwin(int win,bool bVisible);
protected:
    bool eventFilter(QObject *watched,QEvent *event);
//public slots:
private slots:
    void repaintImage();
    void hideEvent(QHideEvent *event);
    void showEvent(QShowEvent *event);
private:
    Ui::monitorForm *ui;
    QTimer *timer;
    QLabel *label;
    QImage *image;
    bool signalinfo_state,edid_state,error_rate_state;

};

#endif // WIDGET_H
